<template>
	<view>
		<u-empty v-if="RcnList == ''"   iconColor="#f18b49" text="暂无可对账单" style="margin-top: 150rpx;"></u-empty>
		<view  v-for="(items,index) in RcnList" :key="index" >
			<uni-list-item :title="items.order_no"  :note='items.time'  showArrow thumb="../../../static/bill.png"  to="`./rct-detail`"  @click="getRcnDetail(items.id)"	thumb-size="base" rightText="查看账单" />
		</view>
		
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				user_id:'',
				RcnList:{}
			}
		},
		onLoad(e){
			this.user_id = e.user_id
			this.getRcnInfo()
		},
		onShow(e){
			
		},
		methods: {
			
			//获取账单
			getRcnInfo(){
				this.$getHttp(`/gjcApi/reconList?user_id=${this.user_id}`,{},res=>{
					if(res.code == 200){
						this.RcnList = res.data
						
					}
				})
			},
			
			//获取账单详情
			getRcnDetail(id){
				console.log(id)
				uni.navigateTo({
					url:'/pages/my/Reconciliation/rct-detail?recon_id='+id
				})
			}
		}
	}
</script>

<style  lang="scss" scoped>
	
</style>
